<?php require(WEBTREATS_INCLUDES . "/var.php"); ?>

<div class="clearboth"></div>
</div><!-- inner -->

<div id="footer_teaser_text">
	<div class="inner">
		<div id="footer_blurb"><?php $footer_teaser_text = stripslashes($footer_teaser_text); echo do_shortcode($footer_teaser_text); ?></div>
	</div><!-- inner -->
</div>

	</div><!-- body_block_background -->							
</div><!-- body_block -->

<div id="footer">
	<div class="footer_background">
		
<?php if(!$footer_disable) : ?>
		
	<div class="footer_trim"></div>
	<div class="inner">

<?php
$footer_columns = range(1,$footer_column);

$footer_counter = 1;
$dyn_sidebar = 3;

foreach ($footer_columns as $footer => $column){

	$class = ($footer_column == 1) ? '' : '';
	$class = ($footer_column == 2) ? 'one_half' : $class;
	$class = ($footer_column == 3) ? 'one_third' : $class;
	$class = ($footer_column == 4) ? 'one_fourth' : $class;
	$class = ($footer_column == 5) ? 'one_fifth' : $class;
	$class = ($footer_column == 6) ? 'one_sixth' : $class; 
	$last = ( ($footer_counter == $footer_column) && ($footer_column != 1) ) ? ' last': '';
?>
	<div class="<?php echo $class.$last; ?>"><?php dynamic_sidebar($dyn_sidebar) ?></div>
	
<?php $footer_counter++; $dyn_sidebar++; } ?>
				
<div class="clearboth"></div>

	</div><!-- inner -->
		
<?php endif; ?>
		
	</div><!-- background -->
</div><!-- footer -->

<div id="sub_footer">
	<div class="inner">
		<div class="one_half"><?php $footer_text = stripslashes($footer_text); echo do_shortcode($footer_text); ?></div>			
			<div class="one_half last" style="text-align:right;">
				<div id="footer_nav">
					<?php if($footer_include) { ?>
					<ul>
						<?php wp_list_pages("depth=0&sort_column=menu_order&include=$footer_include&title_li="); ?>
					</ul>
					<?php } ?>
				</div>
			</div>											

<div class="clearboth"></div>
	
	</div><!-- inner -->							
</div><!-- sub_footer -->

<?php wp_footer(); ?>

<script type="text/javascript">Cufon.now();</script>

<?php if (is_single()){ ?>
<!-- share_this_post_tooltip -->
<div class="share_this_post_tooltip">
	<div class="share_this_post_icons">
	<?php echo webtreats_sociable_bookmarks(); ?>
	</div>
</div>
<?php } ?>
</div><!-- body_background -->

</body>
</html>